package com.example.common.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "rel_dr_and_patients")
@IdClass(DrAndPatients.PrimaryKey.class)
public class DrAndPatients implements Serializable {

	private static final long serialVersionUID = 105685175897962979L;
	@Id
	@Column(name = "dc_id_bigint", columnDefinition = "bigint(20)")
	private Long dcId;
	@Id
	@Column(name = "pid_bigint", columnDefinition = "bigint(20)")
	private Long pid;
	@Column(name = "create_time_datetime", columnDefinition = "datetime(3)")
	private Date createTime;
	@Column(name = "last_vi_st_time_datetime", columnDefinition = "datetime(3)")
	private Date lastViStTime;
	@Column(name = "oc_id_bigint", columnDefinition = "bigint(20)")
	private Long ocId;

	@Data
	static class PrimaryKey implements Serializable {
		private static final long serialVersionUID = 8881911190390145150L;
		private Long dcId;
		private Long pid;
	}
}
